package com.example.mylibrarybase.yumengmeng19.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.mylibrarybase.R;
import com.example.mylibrarybase.bar.initAction_Bar;
import com.example.mylibrarybase.base.baseui.BaseActivity;

public class MainActivity_19_task_stack extends BaseActivity implements View.OnClickListener {

    private initAction_Bar mBase_action_bar;
    private TextView mTv_openactivity1;
    private TextView mTv_openactivity2;
    private TextView mTv_openactivity3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
    }

    @Override
    public int getlayouXML() {
        return R.layout.activity_main_19_task_stack;
    }

    @Override
    public void initView() {
        mTv_openactivity1 = (TextView) findViewById(R.id.tv_openactivity1);
        mTv_openactivity2 = (TextView) findViewById(R.id.tv_openactivity2);
        mTv_openactivity3 = (TextView) findViewById(R.id.tv_openactivity3);
        mTv_openactivity1.setOnClickListener(this);
        mTv_openactivity2.setOnClickListener(this);
        mTv_openactivity3.setOnClickListener(this);
        mBase_action_bar = (initAction_Bar) findViewById(R.id.base_action_bar);
        mBase_action_bar.setCallBack(new initAction_Bar.Action_bar_call_back() {
            @Override
            public void getAction_barView_backbutton(TextView textView) {

            }

            @Override
            public void getAction_barView_backbutton_icon(ImageView imageView) {

            }

            @Override
            public void getAction_barView_title(TextView textView) {
                textView.setText("任务栈测试");
            }

            @Override
            public void getAction_barView_right_icon(ImageView imageView) {

            }
        });
    }

    @Override
    public void initData() {

    }

    @Override
    public void onClick(View view) {
        int i = view.getId();
        if (i == R.id.tv_openactivity1) {
            Intent intent = new Intent(this, MainActivity_19_1.class);
            intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
            startActivity(intent);
            Intent intent1 = new Intent(this, MainActivity_19_2.class);
            intent1.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
            startActivity(intent1);
            Intent intent2 = new Intent(this, MainActivity_19_3.class);
            intent2.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
            startActivity(intent2);

        } else if (i == R.id.tv_openactivity2) {
            Intent intent = new Intent(this, MainActivity_19_2.class);
            intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
            startActivity(intent);


        } else if (i == R.id.tv_openactivity3) {
            Intent intent = new Intent(this, MainActivity_19_3.class);
            intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
            startActivity(intent);

        }
    }
}
